const app = getApp()

// 注册页面
Page({
  data: {
    x: 100
  },

  onReady() {
    // console.log(app.info.msg)
    const pages = getCurrentPages()
    console.log(pages[0].data.home)
  },

  onPullDownRefresh() {
    console.log(0)
  },

  onReachBottom() {
    console.log(1)
  },

  onPageScroll() {
    console.log(0)
  },

  onShareAppMessage() {
    const promise = new Promise(resolve => {
      setTimeout(() => {
        resolve({
          title: '自定义转发标题'
        })
      }, 2000)
    })
    return {
      title: '自定义转发标题',
      path: '/page/user?id=123',
      promise
    }
  },

  onTabItemTap() {
    console.log(100)
  }
})